fix: NetworkVariables of enum types breaking the inspector [MTT-6212]#2529
fix: NetworkVariables of enum types breaking the inspector [MTT-6212]#2529ShadauxCat merged 4 commits intodevelopfrom
Conversation
| - Fixed issue where a client could throw an exception if abruptly disconnected from a network session with one or more spawned `NetworkObject`(s). (#2510) | ||
| - Fixed issue where invalid endpoint addresses were not being detected and returning false from NGO UnityTransport. (#2496) | ||
| - Fixed some errors that could occur if a connection is lost and the loss is detected when attempting to write to the socket. (#2495) | ||
| - Fixed the inspector throwing exceptions when attempting to render `NetworkVariable`s of enum types. (#2529) |
There was a problem hiding this comment.
do we now render enum values in the inspector properly or do we just suppress/hide it? (didn't check the code yet :P but having it written in the changelog line would also be nice too, so I'm commenting this inline)
There was a problem hiding this comment.
They're rendered correctly. It's a fix to a regression, they're the way they were before the bug.
| MethodInfo method; | ||
| if (isEquatable) | ||
| { | ||
| method = typeof(NetworkBehaviourEditor).GetMethod("RenderNetworkContainerValueTypeIEquatable", BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy | BindingFlags.NonPublic); |
There was a problem hiding this comment.
can we use nameof() here for the constant string "RenderNetworkContainerValueTypeIEquatable" value?
| } | ||
| else | ||
| { | ||
| method = typeof(NetworkBehaviourEditor).GetMethod("RenderNetworkContainerValueType", BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy | BindingFlags.NonPublic); |
There was a problem hiding this comment.
^ same for "RenderNetworkContainerValueType"
0xFA11
left a comment
There was a problem hiding this comment.
minor suggestions but other than that, all good
- review feedback - fixed an issue that could cause variables to render twice if the result of `NicifyVariableName()` is different from the actual variable name.
NoelStephensUnity
left a comment
There was a problem hiding this comment.
Tested under a couple of various conditions and it looks like that handles a couple of issues in one pass.
LGTM!
fixes #2444
Changelog
NetworkVariables of enum types.Testing and Documentation